
<!DOCTYPE>
<html >
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>返利</title>
<link rel="Shortcut Icon" href="/resources/image/logo.png" />
<link rel="stylesheet" type="text/css" href="/resources/css/style.css" />
<script type="text/javascript" src="/resources/js/jquery-2.0.3.min.js"></script>
</head>
<body >
<form >
<div class="tCenter hMargin">
<table id="checkList" class="login shadow" cellpadding=0 cellspacing=0 >
<tr><td height="5" colspan="2" class="topTd" ></td></tr>
<tr class="row" ><Th colspan="2" class="tCenter space" ><img src="/resources/image/preview_f2.png" width="32" height="32" border="0" alt="" align="absmiddle"> 返利网--任务调度管理系统登录</th></tr>
<tr><td id="msg" height="5" colspan="2" class="topTd" style="color:red" ></td></tr>
<tr class="row" ><td colspan="2" class="tCenter"><div id="result" class="result none"></div></td></tr>
<tr class="row" ><td class="tRight" width="25%">帐 号：</td><td><input id="username" type="text" class="medium bLeftRequire" check="Require" warning="请输入帐号" name="username"></td></tr>
<tr class="row" ><td class="tRight">密 码：</td><td><input id="password" type="password" class="medium bLeftRequire" check="Require" warning="请输入密码" name="password"></td></tr>                
<tr class="row" ><td class="tCenter" align="justify" colspan="2">
<input type="hidden" name="ajax" value="1">
<input id="submit" type="button" value="登 录" class="submit medium hMargin">
</td></tr>
<tr><td height="5" colspan="2" class="bottomTd" ></td></tr>
</table>
</div>
</form>
<script >
function login(){
	var user = $("#username").val();
	var pass = $("#password").val();

	$.post('/fanli/login', { 'username': user,'password': pass}, function (data, status) {
		if(data.success){
			window.open(data.msg,"_self");
		}else{
			/* alert(data.msg); */
			$("#msg").html(data.msg);
			$("#password").val("");
			/* $("#password").val(""); */
		}
	});
	
}
$(document).ready(function(){
	$("#submit").click(function() {
		login();
	});
});
</script>
</body>
</html>